<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    let str = "hello world!";
    console.log("str 是否包含:", str.includes("hello"));
    console.log("str是否以hello,开头:", str.startsWith("hello"));

    //todo 字符串模板

    let strtmp = `${str} 是否包含有:${str.includes("hello")}`; //hello world! 是否包含有:true
    console.log(strtmp);

    let json = {"name": "aaa", age: 18}
    for (let i = 0; i < 10; i++) {
        let litmp = `<li>name:${json.name};age:${json.age+i}</li>`
        console.log(litmp)
    }
//<li>name:aaa;age:18</li> ... <li>name:aaa;age:27</li>

</script>
<body>
<div>

</div>
</body>
</html>